{\fs200\fad(200,200)\c&HFFFFFF&\pos(1908,568)}本视频仅供教育用途
{\fs200\fad(200,200)\c&HFFFFFF&\pos(1884,1934.667)}Windows是微软公司的注册商标\N
分享Windows源代码是非法且极其不鼓励的行为
{\fad(200,0)}翻译/压制/字幕制作:HAF半个水果
{\fad(200,200)\pos(1933.334,224)}使用AI工具翻译,如有不准确的地方请在弹幕或评论区指正,谢谢!
{\fad(200,200)\pos(1933.334,224)}翻译质量权威评价:原来25年就有小拉即用机翻糊弄人了
Hello everybody. In this video
but it's illegal to share it.
and a bunch of anonymous brave souls compiled it and confirmed that it was indeed Windows XP.
It lacked the source code for a couple applications here and there
but the pioneers filled in the blanks and managed to get it going.
NCD also dared to upload a video demonstrating
Microsoft tickled him a bit.
but I have not seen anyone examine the source code yet
and I volunteered to be the guy
because with open-source software
since they've got better things to do.
Let's just make it clear before we start.
This video is made for educational and entertainment purposes only.
and the first thing I started looking for were profanities.
We all had struggles writing code
and maybe Microsoft employees wanted to let off some steam while coding.
I know for sure the Linux source code has profanities
And there was a paper analyzing a correlation between the count of profane words in the code
and the quality of said code.
There is a file called poo.txt containing a single word
profound. I really don't know why that file exists
because there are no direct references to it.
antiGDI is not going to work without it.
No way. Keep random out of this subdirectory or die.
There is some ugly * going on here.
And obviously that's GUI code. Of course
We also get a bunch of um dictionaries.
made for profanity filters and slur filters.
This don't work because you can't edit a just inserted I frame.
Create a bunch of * and then insert the iframes and make them pretty and then do this *
Window * and then you get the W&D pros the message handler for the GUI window in win API.
Initialize the event log so we can log *
This is a good one. Needed because com control is a stinking piece of *
pretty rough. I can agree.
So the next word I searched for was
and uh yeah there was nothing
but were there any derivative
I decided to look for other words
like the rword and um I noticed they actually used the word correctly
they're using the word retard
to say they're slowing down the thread creation delay for a little bit. So it's not a curse word here.
same case here. They're also saying they're
slowing down or you know just decreasing the bite count to resend the last bite.
They're just using the word retard for that.
matches are from dictionaries. Yeah
they're clean on the R word. Then I looked for the word hell
This is this looks like the commit history and one of the commits is called what the hell?
We didn't find anything in the given restore path.
Check the SZ atomic new subdirectory. What the hell is this?
As we can see the coordination of the employees was unmatched.
What about heck? What the heck? Let him change it.
This shouldn't ever happen
nothing super stinky about this.
Append to message. It's hex.
Look at the ASCII table. It makes sense.
There's probably a cute way to do this in a loop.
But what the heck? I'm lazy
This is so cute. This This word is really cute. I love this word stoopid
hacky looking stuff even though it's just arithmetics.
We can find more hacks if we want to.
Someone couldn't find the library.
What the heck do we do with this one?
Why the heck does Windows-On-Windows use such an odd error code?
And that's a magic value.
Looks like it. I'd be pissed
Lots of surprises in the code base.
What the heck does it mean?
So much confusion. Just for the heck of it. Just for the heck of it.
Employees also had fun. What the heck? Adding and deleting.
What the heck is this option?
Just skip over it. Not too unlikely
but what the heck? So that's it for the hex I think
there was this word in an
assembly file. Null pointer assignment
and a new line and a little terminator.
in the entire Windows source code.
Don't you dare change anything in here or rare will kill you.
Holy depends on this. March 25th of 91.
Remember when I promised to kill you last?
Looks like they didn't listen.
Don't make me kill you for reordering the following IDs.
Fong has something to say here.
How dare you lock a handle twice to get the same ponder without unlocking it?
That's the only occurrence of this word I could find.
Note all the definitions defined below are used to make the compiler shut up.
just to shut up the compiler. Shut up the compiler
that it will shut up. Shut up the compiler. Shut up the compiler. Shut up the compiler to shut up compiler
to get prefast to shut up about use of alloc a.
Shut up the FM synthesizer.
Shut up the compiler. Shut up the compiler.
The Microsoft compiler is pretty rough. I also used a couple of pragmas to shut it up with unnecessary warnings.
They don't like the compiler
being annoying with warnings and stuff
so they have to shut it up.
That's shut up. I have no idea what a tag of 5 is for. I have no idea why we're doing that.
I have no idea why this isn't 1
I have no idea what this routine is for.
I have no idea what this routine is for.
I have no idea who came up with this wonderful scheme
but we have to live with it.
I have no idea what Windows 95 would have done.
I have no way of making them any better than this at this point.
Who cares? It makes the director happy.
and nothing has changed in the programming industry
and I have no idea whatsoever whether this was just
sloppiness or a real requirement and no desire to mess around trying to figure it out.
I have no idea on the origin of this
or if it is still important.
It shouldn't hurt anything to keep it in to save us from some nasty compatibility problem.
Why it has to be nine bytes long? I have no idea.
This call needs some preparation that I have no time for.
I have no idea what's going on here. But for now
I have no idea why we need to do this. This code came from Ralph.
I have no idea what the error code could be. Put it here if when we find out.
I have no idea why it doesn't work if this line is here.
I have no idea how many decibels the range is.
I have no idea why it fails after we close this key
I have no idea what to put here. Hope this works.
I have no idea what that comment means.
If you're watching this video
I read your blog from time to time. It's super fun.
The old new thing you can check this out.
Raymond Chen is a is a super based guy.
I have no idea what this comment means.
This constructor is not used. I have no idea if it even works anymore.
Then I looked up how many times the disgust emotion appears and uh
quite a bit. Totally disgusting hack in order to catch VK return the enter key
before the edit control gets in. Check to see if an
This macro really should take a parameter
parenthesesless definition of begin.
Indexes are a disgusting way to get this info.
This is disgusting. But GDI plus needs to be initialized and shut down on the same thread.
So we have to create a thread just for this
and have it sit around so that we're guaranteed this is the thread we'll do the startup and shutdown on.
Disgusting. There's an explanate.
There's an entire hack explanation and in the parenthesis it says disgusting.
Another disgusting cludge
but works. There's an ugly disgusting hag here making this code aware of the structure.
Really? There's even more. Before we get started
unless we slow down transactions over the network. So
I don't know what that means.
If we fail to translate in the range
The correct thing is for card bus to pass the here via the back door while it has while it has it at the FDO level.
happens on x86 machines today. And after all
This is really gross. We have to do some real gross stuff.
This is kind of gross. We're just going to be gross about this until the job finishes.
This flag has been added for a gross hack introduced in batch processing.
Here is a gross temporary fix to get around the series design flow in the secondary cache.
End of gross hack. Alias stuff moved out due to gross bloating of this file.
This is a gross hack. Now begins a
gross hack hack hack for fixing word perfect.
This is a triple hack. This is a this is something really disgusting. This must be horrible. This is a gross hack.
This is this is gross. But so is our compiler.
Gross. Everyone in lines the first part.
This is a gross exception to make.
Gross and not 100% reliable. This is gross and ugly
but it's better than allocating virtual memory.
The amount of memory used in the following is gross overkill.
Really gross. This is pretty gross. This is really gross. We make
the gross assumption. This requires a gross
enumresourcenamesW call totally gross linear search to determine the namespace index.
There's there's so much gross stuff in here.
Oh my god. Gross temporary hack.
This This looks kind of gross.
This end of gross. This is a gross hack.
Gross hack. Gross hack. Really gross.
Gross hack for NTFS people.
{\pos(1944,1684)}This is a bit gross. This is a bit gross. This is gross. But we need to do it
{\pos(1920,1696)}else we get tons of warnings. Wow. So much gross stuff in this codebase.
Fix horrid nano Luca headbug but leaves memory leak.
Oh my god. Just just till I can.
Today I learned I think today I learned I can replace this horrid
parameter parsing with my own.
The warning. The following is an incredibly horrid hack. I'm ashamed to write code like this.
No matter how you write this
Use the horrid row version
if available. Terrible hack.
we get tons and tons of hack hacks.
If we search for triple hacks
oh my god this is a hack overload
fix me we get lots of fix me as well
all right this should be it for now
I can search for funny stuff in such a large code base for days
I hope you guys had a laugh
if you want more content like that. And take care.
大家好。在本视频中,我将向大家展示在Windows源代码中发现的一些隐藏宝藏
没错,你没听错。Windows的源代码可以在互联网上下载
2020年,Windows XP的源代码在4chan上被泄露了
有一群匿名的勇敢者将其编译完成,并确认那确实是Windows XP系统
有一篇论文分析了代码中脏话数量与某些因素之间的相关性
超级有趣。总之,这大概就是你在缩略图上会看到的那张
但实际上,你要知道,这是最重要的文件,没有它Windows XP的
不是吧。别把乱七八糟的东西放进这个子目录,否则后果自负
创建一堆 *,然后插入 iframe 并让它们看起来很漂亮,接着做这个 *
Window * 然后你会得到 W&D 的优点,即在 Win API 中为 GUI 窗口处理消息
这是个好东西。之所以需要它,是因为com控件简直是坨*
是说他们稍微放缓了线程创建的延迟。所以这里并不是什么脏话
正在放慢速度,或者你知道的,就是减少咬合次数以重新发送最后一次咬合
他们在R这个词上无可指摘。接着我又去查了hell这个词
这看起来像是提交历史记录,其中有一条提交的名称竟然是“搞什么鬼”?
检查一下szAtomicNew的子目录。这到底是什么鬼东西?
但公平地说,要在微软这样的规模上协调行动是相当困难的。所以,你知道的
我想关于“hell”的词就这些了。我实在想不出还有什么骂人的衍生词了
这太可爱了。这个词真的超可爱。我超爱这个词——蠢萌
尽管只是算术运算,他们却在搞一些看起来挺取巧的花样
见鬼,总比什么都没有强。我想我们已经做过这个了,不过管他呢?
为什么Windows-On-Windows要用这么奇怪的错误代码?
所以,我们搞到了不少“黑招”。虽然有点不光彩,但管他呢?
但这到底是怎么回事?我想关于十六进制的内容就这些了吧
你竟敢不解锁就重复加锁同一个句柄来获取相同的ponder?
让它闭嘴。让编译器闭嘴。让编译器闭嘴。让编译器闭嘴以便让编译器闭嘴
从而让prefast停止对alloc a使用的抱怨
微软的编译器相当粗糙。我还用了几条编译指令来屏蔽那些不必要的警告提示
闭嘴吧。我完全不知道5的标签是干嘛用的。我也不明白我们为什么要这么做
所以,基础啊,这一点非常强大。如果缓存没有启用,那我压根不知道 VDL 是什么
马虎大意还是真有这么个要求,也压根不想费神去琢磨明白
保留它以防万一出现棘手的兼容性问题,总归不会有什么坏处
我完全搞不懂这里发生了什么。不过眼下,我还是先把这个异常情况记下来吧
我完全不明白我们为什么要做这个。这段代码是Ralph写的
我不知道错误代码可能是什么。等我们查出来后记在这里
我不知道为什么关闭这个key后会失败,但事实就是如此
这个构造函数未被使用。我甚至不知道它现在是否还能工作
介入前捕获VK回车键。检查是否需要为link.exe实现一个
绝对恶心、令人作呕到极点的应用程序技巧 MSC 1.5
这个宏本应接收参数,但我们被迫以这种令人厌恶的巧妙方式实现
这真让人恶心。但GDI +必须在同一线程上初始化和关闭
但能用。这里有个又丑又恶心的老巫婆在让代码感知结构
这真让人恶心。我们被迫使用这些恶心的伎俩。那“恶心”怎么说呢?
真的吗?还有更糟的。在我们开始之前,得先检查一些非常恶心的事情
这确实很恶心,但在没有调试器的零售版构建中,EFI会彻底失控
除非我们降低网络上的交易速度。因此,在UDP操作后,小憩片刻
恶心吧?这些卡标称32mb内存需求,实际却能解码64mb数据
天啊,居然还有专门为“该死”而准备的完整预处理宏。哇哦
好吧,这看起来有点恶心,但把上下部分改成LC似乎稍微高效一些
如果我们在范围内无法翻译,那就随它去吧。这很可能是因为BIOS有bug
正确做法是让卡总线通过后门在此处通行,同时保持其在FDO层级的状态
是的,这是个相当粗暴的临时解决方案。好吧,这确实有点糙
x86机器的现状。说到底,我们这样做仅仅是为了向后兼容——真够恶心的
这里有一个粗糙的临时解决方案,用于绕过二级缓存中的串行设计缺陷
现在开始一连串粗糙的修修补补,就为搞定Word Perfect的问题
这是个三重恶心。这真是令人作呕的东西。这一定很可怕。这是个极其恶心的伎俩
在开始之前,我们得检查一下有没有什么特别恶心人的东西
粗糙的enumresourcenamesW调用,通过完全粗暴的线性搜索来确定命名空间索引
{\pos(1980,1592)}这有点恶心。这有点恶心。这很恶心。但我们必须这么做
{\pos(2324,1812)}*在X上关注enderman!
{\pos(1920,1604)}否则我们会收到一堆警告。哇,这代码库里有太多糟糕的东西了
修复了可怕的nano Luca头部bug,但遗留了内存泄漏问题
是啊,最后那个选项恐怖到没法讨论。估计他们忘了在这儿加个“O”吧
警告。以下是一段极其糟糕的代码。我羞于写出这样的代码
哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{\fad(200,200)\pos(1909.333,220)}原标题:The Hidden Gems in the Windows Source Code 原作者:Enderman
{\fad(200,200)\pos(1909.333,220)}原视频上传日期:2025年5月15日
{\fad(200,200)\fscx190\fscy189\pos(1939.999,740.666)}在 Youtube 上关注
{\fad(200,200)\pos(1920,1054.667)}翻译/压制/字幕制作:HAF半个水果
{\fad(200,200)\pos(1914.666,1113.333)}翻译质量权威评价:原来25年就有小拉即用机翻糊弄人了\N
\N
向所有字幕制作及相关人员道一声辛苦了 (*ˊᗜˋ*)/ᵗᑋᵃᐢᵏ ᵞᵒᵘ*\N
感谢字幕组的默默耕耘,你们的每一行字都能让更多人能够跨越语言障碍,享受精彩的内容
{\fad(200,200)\pos(1973.333,1052)}字幕制作不易,喜欢的话支持一下我吧!